home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_400
/
416_01
/
matrix
/
matrix.h
< prev
next >
Wrap
C/C++ Source or Header
|
1989-11-17
|
694b
|
36 lines
#ifndef defsmat
#define defsmat 1
/* Matrix structure */
typedef struct
{
int rows;
int cols;
double *block;
} matrix,*matrixptr;
/* E.G.
double b4x4A[4][4]=
{
6,1,6,6,
1,6,6,0,
0,3,2,1,
8,6,1,9
};
matrix m4x4A={4,4,&b4x4A[0][0]};
*/
/* Function prototypes */
void mprint(matrixptr);
void smmult(matrixptr,double);
int madd(matrixptr m1,matrixptr m2,matrixptr dm);
int mmult(matrixptr m1,matrixptr m2,matrixptr dm);
int mcopy(matrixptr sm,matrixptr dm);
int mtrans(matrixptr sm,matrixptr dm);
double det(matrixptr m);
int minv(matrixptr sm,matrixptr dm);
int nsolve(int rows,double *data);
int mid(matrixptr);
void mzero(matrixptr);
#endif